package Day16;

import java.rmi.activation.ActivationSystem;
import java.util.Scanner;

public class Text4 {
    /*public static void main(String[] args) {
      double money = 100000;
      int count = 0;
      while(true){
          if(money > 50000){
              money *= 0.95;
              count++;
          }else if(money >= 1000){
              money -= 1000;
              count++;
          }else{
              break;
          }
      }
        System.out.println(count);

    }*/

  /*  public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("‘请输入数字");
        int number = sc.nextInt();
        if(number > 0){
            System.out.println("大于0");
        }else if(number < 0){
            System.out.println("小于0");
        }else{
            System.out.println("等于0");
        }
    }*/


    /*public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入年份");
        int year = sc.nextInt();
        if(year % 4 == 0 && year % 100 != 0){
            System.out.println("是闰年");
        }else{
            System.out.println("是平年");
        }
    }*/

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入数字");
        int num = sc.nextInt();
        int ge = num % 10;
        System.out.println(ge);
        int shi = (num / 10) % 10;
        System.out.println(shi);
        int bai = num / 100;
        System.out.println(bai);
       if(ge * ge * ge + shi * shi * shi + bai * bai * bai == num){
           System.out.println(num + "是一个水仙花数");
       }else{
           System.out.println(num + "不是一个水仙花数");
       }
    }
}
